package com.xing.binbackend.pattern.strategy33.ecommerce.pay;

public class PaymentStrategyFactory {
    public static PaymentStrategy getStrategy(String payType) {
        switch (payType.toLowerCase()) {
            case "alipay":
                return new AlipayStrategy();
            case "wechat":
                return new WechatPayStrategy(true);
            default:
                throw new IllegalArgumentException("Unsupported payment type");
        }
    }
}


